home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
pc
/
media
/
dirs
/
BackUp
/
Home.dir
/
00009_Script_house_objects
< prev
next >
Wrap
Text File
|
2002-10-15
|
1KB
|
63 lines
property myid,is_alternate,change_num,mysprite,spritenum,total_changes,state,orect,mymem,roll
on new me
mysprite=sprite(spritenum)
change_num=0
total_change=0
state=0
orect=mysprite.rect
mymem=mysprite.member
if not(is_alternate) then makeroll(me)
end
on beginsprite me
if is_alternate then
mysprite.loch=(-2000)
end if
end
on getpropertydescriptionlist me
plist=[#myid:[#comment:"My audio response:",#format:#string,#default:""],\
#is_alternate:[#comment:"Is alternate image for",#format:#boolean,#default:0]]
return plist
end
on mouseenter me
if not(is_alternate) then
mysprite.member=roll
updatestage
end if
end
on mouseleave me
if not(is_alternate) then
mysprite.member=mymem
updatestage
end if
end
on mousedown me
if not(is_alternate) then
mysprite.loch=(-2000)
sendallsprites(#item_changed,myid)
sendsprite(-5,#item_clicked)
puppetsound 1,myid
end if
end
on item_changed me,id
if is_alternate and id=myid then
mysprite.rect=orect
updatestage
end if
end
on makeroll me
temp=image(mymem.width,mymem.height,16)
temp2=image(mymem.width,mymem.height,16)
temp.copypixels(member("bgcolor").image,mymem.rect,member("bgcolor").rect)
temp.copypixels(mymem.image,mymem.rect,mymem.rect,[#ink:36])
temp2.copypixels(temp,mymem.rect,mymem.rect,[#ink:4])
roll=new(#bitmap,castlib "scratch")
roll.image=temp2
end